<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="fr"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="fr"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="fr"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--><html lang="fr"> <!--<![endif]-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title><?php echo (!empty($seo_title)) ? $seo_title .' - ' : ''; echo $this->config->item('company_name'); ?></title>


	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<?php if(isset($meta)):?>
	<?php echo $meta;?>
<?php else:?>
<meta name="Keywords" content="Shopping Cart,produit bio, eCommerce, asieco">
<meta name="Description" content="Boutique de vente en ligne">
<?php endif;?>


<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">

	<!-- jquery ui css -->	
	<?php echo theme_css('jquery-ui-1.10.1.min.css', true);?>
	<?php echo theme_css('customize.css', true);?>
	<?php echo theme_css('font-awesome.css', true);?>
	<?php echo theme_css('style.css', true);?>
	<?php echo theme_css('color/green.css', true);?>
	<!-- flexslider css-->
	<?php echo theme_css('flexslider.css', true);?>
	<!--[if lt IE 9]>
		<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
		<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js"></script>
		<?php echo theme_css('font-awesome-ie7.css', true);?>
	<![endif]-->
	<!-- Favicons
	================================================== -->
	<link rel="shortcut icon" href="images/favicon.ico">
	<link rel="apple-touch-icon" href="images/apple-touch-icon.png">
	<link rel="apple-touch-icon" sizes="72x72" href="images/apple-touch-icon-72x72.png">
	<link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">


<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>

<?php
//with this I can put header data in the header instead of in the body.
if(isset($additional_header_info))
{
	echo $additional_header_info;
}

?>
</head>

<body>


	<div id="mainContainer" class="clearfix">

		<!--begain header-->
		<header>
			<div class="upperHeader">
				<div class="container">
					<ul class="pull-right inline">
					
						<?php if($this->Customer_model->is_logged_in(false, false)):?>
						<li><a class="invarseColor"  href="<?php echo  site_url('secure/my_account');?>"><?php echo lang('my_account')?></a></li>
						<li class="divider-vertical"></li>
						<li><a class="invarseColor"  href="<?php echo  site_url('secure/my_downloads');?>"><?php echo lang('my_downloads')?></a></li>
						<li class="divider-vertical"></li>
						<li><a class="invarseColor"  href="<?php echo site_url('secure/logout');?>"><?php echo lang('logout');?></a></li>
						<?php else: ?>
							<li><a href="<?php echo site_url('secure/login');?>"><?php echo lang('login');?></a></li>
						<?php endif; ?>
					</ul>
						
					
					<p>
					Bienvenue chez Asieco.com,  <?php if(!$this->Customer_model->is_logged_in(false, false)):?><a href="/secure/register">Créer une compte</a><?php endif;?>
					</p>
				</div><!--end container-->
			</div><!--end upperHeader-->

			<div class="middleHeader">
				<div class="container">

					<div class="middleContainer clearfix">

					<div class="siteLogo pull-left">
						<h1><a class="brand" href="<?php echo site_url();?>"><?php echo $this->config->item('company_name');?></a></h1>
					</div>

					<div class="pull-right">			
					
						<?php echo form_open('cart/search', 'class="form-search"');?>
							<div class="input-append">
								<input type="text" class="search-query span2" id="appendedInputButton" placeholder="<?php echo lang('search');?>" name="term"/>
								<button class="btn btn-primary" type="submit"><i class="icon-search"></i></button>
							</div>
						<?php echo form_close()?><!--end form-->
					</div><!--end pull-right-->

					<div class="pull-right">
						<div class="btn-group">
							<a class="btn dropdown-toggle" data-toggle="dropdown" href="<?php echo site_url('cart/view_cart');?>">
							    <i class="icon-shopping-cart"></i> 
								<?php
								if ($this->go_cart->total_items()==0)
								{
									echo lang('empty_cart');
								}
								else
								{
									if($this->go_cart->total_items() > 1)
									{
										echo sprintf (lang('multiple_items'), $this->go_cart->total_items());
									}
									else
									{
										echo sprintf (lang('single_item'), $this->go_cart->total_items());
									}
								}
								?>
							    <span class="caret"></span>
							</a>
							<div class="dropdown-menu cart-content pull-right">
							<?php
								if ($this->go_cart->total_items())
								{
							?>
									
								<table class="table-cart">
									<tbody>
									<?php foreach ($this->go_cart->contents() as $productCart):?>
									<tr>
										<td class="cart-product-info">
											<img alt="<?php echo  $productCart['seo_title']?>" src="<?php echo site_url('images/thumbnails/'.$productCart['images']); ?>">
										</td>
										
										<td class="cart-product-setting cart-product-desc" >
											<div><?php echo $productCart['name']?>
											</div>
											<p><strong><?php echo $productCart['quantity']?> x  <?php echo format_currency($productCart['price'])?>=<?php echo format_currency($productCart['price']*$productCart['quantity']); ?></strong></p>
											<a href="#" class="remove-pro" rel="tooltip" data-title="Delete"><i class="icon-trash"></i></a>
										</td>
									</tr>
									<?php endforeach;?>
								</tbody>
								<tfoot>
									<tr>
										<td class="cart-product-info">
											<a href="/cart/view_cart" class="btn btn-small">Mon panier</a>
											<a href="/checkout" class="btn btn-small btn-primary">Valider</a>
										</td>
										<td>
											<h3>TOTAL<br><?php echo format_currency($this->go_cart->total()); ?></h3>
										</td>
									</tr>
								</tfoot>
								</table>
							<?php }?>
							</div>
						</div>
					</div><!--end pull-right-->

					</div><!--end middleCoontainer-->

				</div><!--end container-->
			</div><!--end middleHeader-->

			<div class="mainNav">
				<div class="container">
					<div class="navbar">
					      	
				      	<ul class="nav">
				      		<li class="active"><a href="#"><i class="icon-home"></i></a></li>
				      		
							<?php 
							foreach($this->categories as $cat_menu):?>
							<li>
								<a href="<?php echo site_url($cat_menu['category']->slug);?>"><?php echo $cat_menu['category']->name;?> <i class="icon-caret-down"></i></a>
								<?php if(isset($cat_menu['children'])):?>
									<div><ul>
										<?php 
										foreach($cat_menu['children'] as $cat):
										?>
										<li>
											<a href="<?php echo site_url($cat['category']->slug);?>"> <span>-</span> <?php echo $cat['category']->name;?></a>
										</li>
										<?php endforeach;?>
									</ul></div>
								<?php endif;?>
							</li>
							<?php endforeach;?>
				      		
				      	</ul><!--end nav-->

					</div>
				</div><!--end container-->
			</div><!--end mainNav-->	
			
		</header>
		<!-- end header -->




		<div class="container">
		
		<?php if(!empty($base_url) && is_array($base_url)):?>
			<div class="row">
				<div class="span12">
					<ul class="breadcrumb">
						<?php
						$url_path	= '';
						$count	 	= 1;
						foreach($base_url as $bc):
							$url_path .= '/'.$bc;
							if($count == count($base_url)):?>
								<li class="active"><?php echo $bc;?></li>
							<?php else:?>
								<li><a href="<?php echo site_url($url_path);?>"><?php echo $bc;?></a></li> <span class="divider">/</span>
							<?php endif;
							$count++;
						endforeach;?>
 					</ul>
				</div>
			</div>
		<?php endif;?>
		
		<?php if ($this->session->flashdata('message')):?>
			<div class="alert alert-info">
				<a class="close" data-dismiss="alert">×</a>
				<?php echo $this->session->flashdata('message');?>
			</div>
		<?php endif;?>
		
		<?php if ($this->session->flashdata('error')):?>
			<div class="alert alert-error">
				<a class="close" data-dismiss="alert">×</a>
				<?php echo $this->session->flashdata('error');?>
			</div>
		<?php endif;?>
		
		<?php if (!empty($error)):?>
			<div class="alert alert-error">
				<a class="close" data-dismiss="alert">×</a>
				<?php echo $error;?>
			</div>
		<?php endif;
		
/*
End header.php file
*/